package com.work.straighttalk.bean;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;


/**
 * Created by 朱相卿 on 16/3/3.
 */
public class Contact implements Parcelable {
    private String status;
    private String name;
    private String phoneNumber;
    private String avater;
    /**
     * @param type 用于判断是来源于网络还是来源于本地
     */
    private int type;

    public Contact() {
    }

    protected Contact(Parcel in) {
        status = in.readString();
        name = in.readString();
        phoneNumber = in.readString();
        avater = in.readString();
        type = in.readInt();
        sortKey = in.readString();
    }

    public static final Creator<Contact> CREATOR = new Creator<Contact>() {
        @Override
        public Contact createFromParcel(Parcel in) {
            return new Contact(in);
        }

        @Override
        public Contact[] newArray(int size) {
            return new Contact[size];
        }
    };

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
    /**
     * @param sortKey 用于右侧索引侧栏显示
     */
    private String sortKey;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getAvater() {
        return avater;
    }

    public void setAvater(String avater) {
        this.avater = avater;
    }

    public String getSortKey() {
        return sortKey;
    }

    public void setSortKey(String sortKey) {
        this.sortKey = sortKey;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(status);
        dest.writeString(name);
        dest.writeString(phoneNumber);
        dest.writeString(avater);
        dest.writeInt(type);
        dest.writeString(sortKey);
    }
}
